# Contributor: Lindsay Zhou <i@lin.moe>
# Maintainer: Lindsay Zhou <i@lin.moe>
pkgname=fcitx5-anthy
pkgver=5.1.5
pkgrel=0
pkgdesc="anthy input method support for fcitx5"
url="https://github.com/fcitx/fcitx5-anthy"
arch="all"
license="GPL-3.0-or-later"
makedepends="
	anthy-dev
	cmake
	extra-cmake-modules
	gettext-dev
	fcitx5-dev
	fcitx5-qt-dev
	qt5-qttools-dev
	samurai
	"
subpackages="$pkgname-lang"
source="$pkgname-$pkgver.tar.gz::https://github.com/fcitx/fcitx5-anthy/archive/refs/tags/$pkgver.tar.gz"
options="!check" # no tests

build() {
	CFLAGS="$CFLAGS -flto=auto" \
	CXXFLAGS="$CXXFLAGS -flto=auto" \
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
841b2f0e228a604e0575462639a8fddc51030a2c6199979cd24daf0ce3d2ebb8068f76702f883ffa0aa1b015470bbd2ec639cb88baf6e0635c2171c738d20882  fcitx5-anthy-5.1.5.tar.gz
"
